package services

import (
	"context"
	"fmt"
)

// Demo struct
type Demo struct {
	ctx context.Context
}

// NewDemo creates a new Demo application struct
func NewDemo() *Demo {
	return &Demo{}
}

// startup is called when the app starts. The context is saved
// so we can call the runtime methods
func (d *Demo) StartUp(ctx context.Context) {
	d.ctx = ctx
}

// Greet returns a greeting for the given name
func (d *Demo) Greet(name string) string {
	return fmt.Sprintf("Hello %s, It's show time!", name)
}
